package cn.kow.kmall.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: lijun
 * @Description:
 * @Date: Created in 2020-03-05 9:41
 * @Modified By:
 */
public enum ContentModuleTypeEnum {

    OTHER(0,"其他"),
    BANNER(1,"banner位"),
    ACTIVITY(2,"活动位"),
    SUBJECT(3,"专题位"),
    KINGKONG(4,"金刚位"),
    ;

    private Integer type;

    private String name;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    ContentModuleTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = new HashMap<>();
        for (ContentModuleTypeEnum entry : ContentModuleTypeEnum.values()) {
            map.put(entry.getType(), entry.getName());
        }
        return map;
    }
}
